package com.cskaoyan.bean.vo;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class AdminAdListVo {
    /**
     * total : 3
     * pages : 1
     * limit : 10
     * page : 1
     * list : [{"deleted":false,"addTime":"2018-02-01 00:00:00","name":"合作 谁是你的菜","link":"","updateTime":"2022-09-06 16:54:05","id":1,"position":1,"url":"http://yanxuan.nosdn.127.net/65091eebc48899298171c2eb6696fe27.jpg","content":"合作 谁是你的菜","enabled":true},{"deleted":false,"addTime":"2018-02-01 00:00:00","name":"活动 美食节","link":"","updateTime":"2018-02-01 00:00:00","id":2,"position":1,"url":"http://yanxuan.nosdn.127.net/bff2e49136fcef1fd829f5036e07f116.jpg","content":"活动 美食节","enabled":true},{"deleted":false,"addTime":"2018-02-01 00:00:00","name":"活动 母亲节","link":"","updateTime":"2018-02-01 00:00:00","id":3,"position":1,"url":"http://yanxuan.nosdn.127.net/8e50c65fda145e6dd1bf4fb7ee0fcecc.jpg","content":"活动 母亲节5","enabled":true}]
     */
    private int total;
    private int pages;
    private int limit;
    private int page;
    private List<ListEntity> list = new ArrayList<>();

    //给list赋值
    public void setListElements(Boolean deleted,Date addTime,String name,String link,Date updateTime,
                                Integer id,Integer position,String url,String content,Boolean enabled){
        ListEntity listEntity = new ListEntity();
        listEntity.setDeleted(deleted);
        listEntity.setAddTime(addTime);
        listEntity.setName(name);
        listEntity.setLink(link);
        listEntity.setUpdateTime(updateTime);
        listEntity.setId(id);
        listEntity.setPosition(position);
        listEntity.setUrl(url);
        listEntity.setContent(content);
        listEntity.setEnabled(enabled);
        list.add(listEntity);
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public void setPages(int pages) {
        this.pages = pages;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public void setList(List<ListEntity> list) {
        this.list = list;
    }

    public int getTotal() {
        return total;
    }

    public int getPages() {
        return pages;
    }

    public int getLimit() {
        return limit;
    }

    public int getPage() {
        return page;
    }

    public List<ListEntity> getList() {
        return list;
    }

    public class ListEntity {
        /**
         * deleted : false
         * addTime : 2018-02-01 00:00:00
         * name : 合作 谁是你的菜
         * link :
         * updateTime : 2022-09-06 16:54:05
         * id : 1
         * position : 1
         * url : http://yanxuan.nosdn.127.net/65091eebc48899298171c2eb6696fe27.jpg
         * content : 合作 谁是你的菜
         * enabled : true
         */
        private boolean deleted;
        private Date addTime;
        private String name;
        private String link;
        private Date updateTime;
        private int id;
        private int position;
        private String url;
        private String content;
        private boolean enabled;

        public void setDeleted(boolean deleted) {
            this.deleted = deleted;
        }

        public void setAddTime(Date addTime) {
            this.addTime = addTime;
        }

        public void setName(String name) {
            this.name = name;
        }

        public void setLink(String link) {
            this.link = link;
        }

        public void setUpdateTime(Date updateTime) {
            this.updateTime = updateTime;
        }

        public void setId(int id) {
            this.id = id;
        }

        public void setPosition(int position) {
            this.position = position;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public void setEnabled(boolean enabled) {
            this.enabled = enabled;
        }

        public boolean isDeleted() {
            return deleted;
        }

        public Date getAddTime() {
            return addTime;
        }

        public String getName() {
            return name;
        }

        public String getLink() {
            return link;
        }

        public Date getUpdateTime() {
            return updateTime;
        }

        public int getId() {
            return id;
        }

        public int getPosition() {
            return position;
        }

        public String getUrl() {
            return url;
        }

        public String getContent() {
            return content;
        }

        public boolean isEnabled() {
            return enabled;
        }
    }
}
